home *** CD-ROM | disk | FTP | other *** search
- #pragma once
- /*
- FILE: aiff.h
- PROJECT: Ford grant DSP
- AUTHOR: Ben Denckla
- COMMENT: contains macros, external variables, function
- declarations, and data structures relevant to AIFF-based DSP
- programming.
-
- C COMPATIBILITY ISSUES:
- "extended" must be an 80 bit IEEE Standard 754 floating point number.
- This is the same as Standard Apple Numeric Environment
- [SANE] data type "Extended". To achieve this in Think C,
- "8-byte doubles" and "Native floating-point format" must be
- OFF in the Edit:Options...:Compiler Settings dialog
- "short" must be 16 bits long.
- "long" must be 32 bits long.
-
- */
-
- #define DEFFUNC( declaration ) declaration; declaration
-
- typedef struct {
- double rate; // sample rate in frames/sec (96-bit format)
- long framsiz, // sample frame size in bytes
- samdatpos; // input file position of sample data
- } privateheader;
-
- typedef struct { long id, si; } ckhd; // chunk header: id & size
-
- typedef struct {
- short chan; // number of channels
- long fram; // number of sample frames
- short wdsi; // sample word size in bits
- extended rate; // sample rate in frames/sec (80-bit format)
- } comckbod; // common chunk body
-
- typedef struct {
- long offs, bksi; // offset and block size
- } sndckbodbeg; // sound data chunk body beginning
-
- typedef struct {
- ckhd frmhd; // form chunk header
- long frm; // form chunk body beginning (form type)
- ckhd comhd; // common chunk header
- comckbod com;
- ckhd sndhd; // sound data chunk header
- sndckbodbeg snd;
- } basicaiffbeg; // basic AIFF beginning
- // Note that the basicaiffbeg structure allows storage of Common and
- // Sound Data local chunk types only.
-
- extern basicaiffbeg ba;
- extern privateheader ph;
- extern void *d;
-
- void err ( char *errmsg );
- void warn ( char *warnmsg );
-
- // programmer-user variables and functions
- extern int take_input, make_output;
- void process_samdat ( long buflen );
- void init_process ( void );
- void term_process ( void );
-